<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<!-- saved from url=(0014)about:internet -->
<script language="javascript">

var ajax;


	function funcionCallback()
	{
		// Comprobamos si la peticion se ha completado (estado 4)
		if( ajax.readyState == 4 )
		{
			// Comprobamos si la respuesta ha sido correcta (resultado HTTP 200)
			if( ajax.status == 200 )
			{
				// Escribimos el resultado en la pagina HTML mediante DHTML
			//	document.all.salida.innerHTML = "<b>respuesta:{"+ajax.responseText+"}</b>";	
				//alert('se permite acceso:{'+ajax.responseText+'}');
				var str = ajax.responseText+'';
				//alert(str.match('true')+', '+ajax.responseText)
				var v=str.substring(str.indexOf('=')+1,str.length);
				var params ='v='+v;
				if(str.match('principal') &&str.match('principal')!=null ){
				
				//	ajax.open( "POST", "./principal.html",true);
					
				//	ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
				//	ajax.setRequestHeader("Content-length", params.length);
				//	ajax.setRequestHeader("Connection", "close");
					
				//	ajax.send(params);
				
				//	alert('se permite acceso:{'+str+'}');
					window.location=str;
					submit();
				}else{
					alert('Nombre de usuario o contraseña erronea..')
					//	return;
				}
				
				
			}
		}
	}
	
	function verificaUsuario()
	{
	
	
		// Creamos el control XMLHttpRequest segun el navegador en el que estemos 
		if( window.XMLHttpRequest )
			ajax = new XMLHttpRequest(); // No Internet Explorer
		else
			ajax = new ActiveXObject("Microsoft.XMLHTTP"); // Internet Explorer
	
		// Almacenamos en el control al funcion que se invocara cuando la peticion
		// cambie de estado	
		ajax.onreadystatechange = funcionCallback;
	
		// Enviamos la peticion
		ajax.open( "POST", "../LoginServlet?login="+document.getElementById('login').value+'&passwd='+document.getElementById('passwd').value , true );
		ajax.send( "");
	}
/*
	function verificaUsuario(){
		// login passwd 

		if(document.getElementById('login').value != '' &&document.getElementById('passwd').value !='' ){
			alert(document.getElementById('login').value+' '+document.getElementById('passwd').value);	
		}else {
			alert('Alguno de los campos esta vacío');
			return;
		}	
		
	}*/




</script>

<title>Sistema de control de microcréditos</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">td img {display: block;}</style>
</head><body bgcolor="#ffffff">

	<!-- <link rel="stylesheet" type="text/css" href="../lib/extjs/resources/css/ext-all.css"/>
    <link rel="stylesheet" type="text/css" href="../css/estilo.css" />
    <link rel="stylesheet" type="text/css" href="../css/column-tree.css" />


	<script type="text/javascript" src="../lib/extjs/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="../lib/extjs/ext-all.js"></script>
	<script type="text/javascript" src="../lib/extjs/build/locale/ext-lang-es.js"></script>
	
	<script type="text/javascript" src="../js/funGeneral.js"></script>
	<script type="text/javascript" src="../js/funExtJS.js"></script>
	 
	<script type="text/javascript" src="../lib/jsonrpc/jsonrpc.js"></script>
-->
<form id="principal" name="principal">

<p>&nbsp;</p>
<p>&nbsp;</p>

<table width="500" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <th scope="col"><img name="admin_r2_c2" src="../images/admin_r2_c2.jpg" id="admin_r2_c2" alt="" width="594" border="0" height="82" /></th>
  </tr>
  <tr>
    <td><table width="500" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
      <tr>
        <th width="106" scope="col"><img src="SpryAssets/Mexcad.jpg" width="285" height="154" /></th>
        <th width="300" scope="col"><table width="300" align="center" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="font:Arial, Helvetica, sans-serif; font-size:12px">
          <tr>
            <th width="119" align="right" scope="col">Usuario: &nbsp;&nbsp;</th>
            <th width="181" scope="col" align="left"><input name="login" id="login" size="16" maxlength="17" type="text"></th>
          </tr>
		  <tr>
		  	<td align="center">&nbsp;</td>
			<td align="center">&nbsp;</td>
		  </tr>
          <tr>
            <td align="right">Contraseña: &nbsp;&nbsp;</td>
            <td align="left"><input name="passwd" id="passwd" size="17" maxlength="19" type="password"></td>
          </tr>
		  <tr>
		  	<td align="center">&nbsp;</td>
			<td align="center">&nbsp;</td>
		  </tr>
		  <tr>
		  	<td align="center"></td>
			<td align="center"><div align="left">
			  <input type="button" src="../images/admin_r4_c5.jpg" id="admin_r4_c5" value="Ingresar"  width="104" border="0" height="40" onclick="verificaUsuario();">
			  </div></td>
		  </tr>
        </table></th>
        <th width="94" scope="col">&nbsp;</th>
      </tr>
    </table></td>
  </tr>
</table>


<span id="salida"></span>
</form>
</body><script type="text/javascript"><!--
function __RP_Callback_Helper(str, strCallbackEvent, splitSize, func){var event = null;if (strCallbackEvent){event = document.createEvent('Events');event.initEvent(strCallbackEvent, true, true);}if (str && str.length > 0){var splitList = str.split('|');var strCompare = str;if (splitList.length == splitSize)strCompare = splitList[splitSize-1];var pluginList = document.plugins;for (var count = 0; count < pluginList.length; count++){var sSrc = '';if (pluginList[count] && pluginList[count].src)sSrc = pluginList[count].src;if (strCompare.length >= sSrc.length){if (strCompare.indexOf(sSrc) != -1){func(str, count, pluginList, splitList);break;}}}}if (strCallbackEvent)document.body.dispatchEvent(event);}function __RP_Coord_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Coord_Callback = str;pluginList[index].__RP_Coord_Callback_Left = splitList[0];pluginList[index].__RP_Coord_Callback_Top = splitList[1];pluginList[index].__RP_Coord_Callback_Right = splitList[2];pluginList[index].__RP_Coord_Callback_Bottom = splitList[3];};__RP_Callback_Helper(str, 'rp-js-coord-callback', 5, func);}function __RP_Url_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Url_Callback = str;pluginList[index].__RP_Url_Callback_Vid = splitList[0];pluginList[index].__RP_Url_Callback_Parent = splitList[1];};__RP_Callback_Helper(str, 'rp-js-url-callback', 3, func);}function __RP_TotalBytes_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_TotalBytes_Callback = str;pluginList[index].__RP_TotalBytes_Callback_Bytes = splitList[0];};__RP_Callback_Helper(str, null, 2, func);}function __RP_Connection_Callback(str){var func = function(str, index, pluginList, splitList){pluginList[index].__RP_Connection_Callback = str;pluginList[index].__RP_Connection_Callback_Url = splitList[0];};__RP_Callback_Helper(str, null, 2, func);}
//--></script></html>